<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css"/>
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		<script type="text/javascript" src="../js/ztree/jquery.ztree.all-3.5.js"></script>
		<link rel="stylesheet" href="../js/ztree/zTreeStyle.css" />
		<script type="text/javascript">
		/*	$(function(){
				$("#mb").click(function() {
					$("#mytabs").tabs('add',{
						title:'面板一',
						content:'来啊,造作啊'
					});
				});
			});*/
			$(function(){
				var setting = {
					data: {
						simpleData: {
							enable: true // 支持简单json数据格式
						}
					},
					callback:{
						onClick:function(event,treeId,treeNode,clickFlag){
							var content = '<div style="width:100%;height:100%;overflow:hidden;">'
								+ '<iframe src="'
								+ treeNode.page
								+ '" scrolling="auto" style="width:100%;height:100%;border:0;" ></iframe></div>';
							
							if(treeNode.page != undefined && treeNode.page != ""){
								// 如果选项卡已经打开，选中 
								if($("#mytabs").tabs('exists',treeNode.name)){
									// 选中选项卡
									$("#mytabs").tabs('select',treeNode.name);
								}else{
									// 如果没有打开，添加选项卡 
									$("#mytabs").tabs('add',{
										title:treeNode.name,
										content: content,
										closable :true
									});
								}
							}
						}
					}
					
				};
				var zNodes=[
					{id:1,pId:0,name:"德玛西亚"},
					{id:2,pId:0,name:"诺克萨斯"},
					{id:11,pId:1,name:"盖伦",page:"www.baidu.com"},
					{id:12,pId:1,name:"嘉文"},
					{id:13,pId:2,name:"德莱厄斯",page:"大刀向鬼子的头上砍过去"},
					{id:14,pId:2,name:"德莱文"}
				];
					$.fn.zTree.init($("#baseMenu"), setting, zNodes);
			});
		</script>
		
	</head>
	<body class="easyui-layout">
		<div data-options="region:'north',title:'物流管理后台系统'" style="height: 120px;">1</div>
		<div data-options="region:'west',title:'菜单导航'" style="width: 180px;">
			<!--描述：折叠面板 -->
			<div class="easyui-accordion" data-options="fit:true">
				<div data-options="title:'基础菜单'">
					<ul id="baseMenu" class="ztree"></ul>
				</div>
				<div data-options="title:'系统菜单'">面板二</div>
				
			</div>
		</div>
		<!--中心选项卡 -->		
		<div data-options="region:'center'" >
			<div id="mytabs" class="easyui-tabs" data-options="fit:true">
			</div>
		</div>
		
		<div data-options="region: 'east'" style="width: 80px;">4</div>
		<div data-options="region:'south'" style="height: 80px;">5</div>
	</body>
</html>
